package org.admanager.acme.plugin.diagram.part;

import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import org.admanager.acme.plugin.diagram.edit.parts.AcmeRootEditPart;
import org.admanager.acme.plugin.diagram.edit.parts.Component2EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ComponentComponentCompartment2EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ComponentComponentCompartment3EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ComponentComponentCompartmentEditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ComponentPort2EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ComponentPortDelegatedPortsEditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ComponentPortEditPart;
import org.admanager.acme.plugin.diagram.edit.parts.Connector2EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.Connector3EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ConnectorConnectorCompartment2EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ConnectorConnectorCompartment3EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ConnectorConnectorCompartmentEditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ConnectorEditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ConnectorRole2EditPart;
import org.admanager.acme.plugin.diagram.edit.parts.ConnectorRoleDelegatedRolesEditPart;
import org.admanager.acme.plugin.diagram.edit.parts.PortEditPart;
import org.admanager.acme.plugin.diagram.providers.AcmeADManagementMetamodelElementTypes;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.AcmeadmanagementPackage;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.Attachment;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.Binding;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.Component;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.Connector;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.Port;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.Representation;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.Role;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.SimpleElement;
import org.admanager.acmeadmanagement.plugin.acmeadmanagement.System;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.gmf.runtime.notation.View;

/**
 * @generated
 */
public class AcmeADManagementMetamodelDiagramUpdater {

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/getSemanticChildren(
			View view) {
		switch (AcmeADManagementMetamodelVisualIDRegistry.getVisualID(view)) {
		case AcmeRootEditPart.VISUAL_ID:
			return getSystem_1000SemanticChildren(view);
		case ConnectorConnectorCompartmentEditPart.VISUAL_ID:
			return getConnectorConnectorCompartment_7001SemanticChildren(view);
		case ComponentComponentCompartmentEditPart.VISUAL_ID:
			return getRepresentationRepresentationCompartment_7002SemanticChildren(view);
		case ConnectorConnectorCompartment2EditPart.VISUAL_ID:
			return getSystemSystemCompartment_7003SemanticChildren(view);
		case ComponentComponentCompartment2EditPart.VISUAL_ID:
			return getComponentComponentCompartment_7004SemanticChildren(view);
		case ConnectorConnectorCompartment3EditPart.VISUAL_ID:
			return getConnectorConnectorCompartment_7005SemanticChildren(view);
		case ComponentComponentCompartment3EditPart.VISUAL_ID:
			return getComponentComponentCompartment_7006SemanticChildren(view);
		}
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/getSystem_1000SemanticChildren(
			View view) {
		if (!view.isSetElement()) {
			return Collections.EMPTY_LIST;
		}
		System modelElement = (System) view.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/();
		for (Iterator/*[?]*/it = modelElement.getConnectors().iterator(); it
				.hasNext();) {
			Connector childElement = (Connector) it.next();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == ConnectorEditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
				continue;
			}
		}
		for (Iterator/*[?]*/it = modelElement.getComponents().iterator(); it
				.hasNext();) {
			Component childElement = (Component) it.next();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == ComponentPortEditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
				continue;
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/getConnectorConnectorCompartment_7001SemanticChildren(
			View view) {
		if (false == view.eContainer() instanceof View) {
			return Collections.EMPTY_LIST;
		}
		View containerView = (View) view.eContainer();
		if (!containerView.isSetElement()) {
			return Collections.EMPTY_LIST;
		}
		Connector modelElement = (Connector) containerView.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/();
		for (Iterator/*[?]*/it = modelElement.getRoles().iterator(); it
				.hasNext();) {
			Role childElement = (Role) it.next();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == ConnectorRole2EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
				continue;
			}
		}
		{
			Representation childElement = modelElement.getRepresentation();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == Component2EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/getRepresentationRepresentationCompartment_7002SemanticChildren(
			View view) {
		if (false == view.eContainer() instanceof View) {
			return Collections.EMPTY_LIST;
		}
		View containerView = (View) view.eContainer();
		if (!containerView.isSetElement()) {
			return Collections.EMPTY_LIST;
		}
		Representation modelElement = (Representation) containerView
				.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/();
		{
			System childElement = modelElement.getSystem();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == ComponentPort2EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/getSystemSystemCompartment_7003SemanticChildren(
			View view) {
		if (false == view.eContainer() instanceof View) {
			return Collections.EMPTY_LIST;
		}
		View containerView = (View) view.eContainer();
		if (!containerView.isSetElement()) {
			return Collections.EMPTY_LIST;
		}
		System modelElement = (System) containerView.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/();
		for (Iterator/*[?]*/it = modelElement.getComponents().iterator(); it
				.hasNext();) {
			Component childElement = (Component) it.next();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == Connector2EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
				continue;
			}
		}
		for (Iterator/*[?]*/it = modelElement.getConnectors().iterator(); it
				.hasNext();) {
			Connector childElement = (Connector) it.next();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == Connector3EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
				continue;
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/getComponentComponentCompartment_7004SemanticChildren(
			View view) {
		if (false == view.eContainer() instanceof View) {
			return Collections.EMPTY_LIST;
		}
		View containerView = (View) view.eContainer();
		if (!containerView.isSetElement()) {
			return Collections.EMPTY_LIST;
		}
		Component modelElement = (Component) containerView.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/();
		for (Iterator/*[?]*/it = modelElement.getPorts().iterator(); it
				.hasNext();) {
			Port childElement = (Port) it.next();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == PortEditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
				continue;
			}
		}
		{
			Representation childElement = modelElement.getRepresentation();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == Component2EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/getConnectorConnectorCompartment_7005SemanticChildren(
			View view) {
		if (false == view.eContainer() instanceof View) {
			return Collections.EMPTY_LIST;
		}
		View containerView = (View) view.eContainer();
		if (!containerView.isSetElement()) {
			return Collections.EMPTY_LIST;
		}
		Connector modelElement = (Connector) containerView.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/();
		for (Iterator/*[?]*/it = modelElement.getRoles().iterator(); it
				.hasNext();) {
			Role childElement = (Role) it.next();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == ConnectorRole2EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
				continue;
			}
		}
		{
			Representation childElement = modelElement.getRepresentation();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == Component2EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/getComponentComponentCompartment_7006SemanticChildren(
			View view) {
		if (false == view.eContainer() instanceof View) {
			return Collections.EMPTY_LIST;
		}
		View containerView = (View) view.eContainer();
		if (!containerView.isSetElement()) {
			return Collections.EMPTY_LIST;
		}
		Component modelElement = (Component) containerView.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelNodeDescriptor]*/();
		for (Iterator/*[?]*/it = modelElement.getPorts().iterator(); it
				.hasNext();) {
			Port childElement = (Port) it.next();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == PortEditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
				continue;
			}
		}
		{
			Representation childElement = modelElement.getRepresentation();
			int visualID = AcmeADManagementMetamodelVisualIDRegistry
					.getNodeVisualID(view, childElement);
			if (visualID == Component2EditPart.VISUAL_ID) {
				result.add(new AcmeADManagementMetamodelNodeDescriptor(
						childElement, visualID));
			}
		}
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getContainedLinks(
			View view) {
		switch (AcmeADManagementMetamodelVisualIDRegistry.getVisualID(view)) {
		case AcmeRootEditPart.VISUAL_ID:
			return getSystem_1000ContainedLinks(view);
		case ConnectorEditPart.VISUAL_ID:
			return getConnector_2001ContainedLinks(view);
		case ComponentPortEditPart.VISUAL_ID:
			return getComponent_2002ContainedLinks(view);
		case ConnectorRole2EditPart.VISUAL_ID:
			return getRole_3001ContainedLinks(view);
		case Component2EditPart.VISUAL_ID:
			return getRepresentation_3002ContainedLinks(view);
		case ComponentPort2EditPart.VISUAL_ID:
			return getSystem_3003ContainedLinks(view);
		case Connector2EditPart.VISUAL_ID:
			return getComponent_3004ContainedLinks(view);
		case PortEditPart.VISUAL_ID:
			return getPort_3005ContainedLinks(view);
		case Connector3EditPart.VISUAL_ID:
			return getConnector_3006ContainedLinks(view);
		case ConnectorRoleDelegatedRolesEditPart.VISUAL_ID:
			return getAttachment_4001ContainedLinks(view);
		case ComponentPortDelegatedPortsEditPart.VISUAL_ID:
			return getBinding_4002ContainedLinks(view);
		}
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getIncomingLinks(
			View view) {
		switch (AcmeADManagementMetamodelVisualIDRegistry.getVisualID(view)) {
		case ConnectorEditPart.VISUAL_ID:
			return getConnector_2001IncomingLinks(view);
		case ComponentPortEditPart.VISUAL_ID:
			return getComponent_2002IncomingLinks(view);
		case ConnectorRole2EditPart.VISUAL_ID:
			return getRole_3001IncomingLinks(view);
		case Component2EditPart.VISUAL_ID:
			return getRepresentation_3002IncomingLinks(view);
		case ComponentPort2EditPart.VISUAL_ID:
			return getSystem_3003IncomingLinks(view);
		case Connector2EditPart.VISUAL_ID:
			return getComponent_3004IncomingLinks(view);
		case PortEditPart.VISUAL_ID:
			return getPort_3005IncomingLinks(view);
		case Connector3EditPart.VISUAL_ID:
			return getConnector_3006IncomingLinks(view);
		case ConnectorRoleDelegatedRolesEditPart.VISUAL_ID:
			return getAttachment_4001IncomingLinks(view);
		case ComponentPortDelegatedPortsEditPart.VISUAL_ID:
			return getBinding_4002IncomingLinks(view);
		}
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getOutgoingLinks(
			View view) {
		switch (AcmeADManagementMetamodelVisualIDRegistry.getVisualID(view)) {
		case ConnectorEditPart.VISUAL_ID:
			return getConnector_2001OutgoingLinks(view);
		case ComponentPortEditPart.VISUAL_ID:
			return getComponent_2002OutgoingLinks(view);
		case ConnectorRole2EditPart.VISUAL_ID:
			return getRole_3001OutgoingLinks(view);
		case Component2EditPart.VISUAL_ID:
			return getRepresentation_3002OutgoingLinks(view);
		case ComponentPort2EditPart.VISUAL_ID:
			return getSystem_3003OutgoingLinks(view);
		case Connector2EditPart.VISUAL_ID:
			return getComponent_3004OutgoingLinks(view);
		case PortEditPart.VISUAL_ID:
			return getPort_3005OutgoingLinks(view);
		case Connector3EditPart.VISUAL_ID:
			return getConnector_3006OutgoingLinks(view);
		case ConnectorRoleDelegatedRolesEditPart.VISUAL_ID:
			return getAttachment_4001OutgoingLinks(view);
		case ComponentPortDelegatedPortsEditPart.VISUAL_ID:
			return getBinding_4002OutgoingLinks(view);
		}
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getSystem_1000ContainedLinks(
			View view) {
		System modelElement = (System) view.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		result.addAll(getContainedTypeModelFacetLinks_Attachment_4001(modelElement));
		result.addAll(getContainedTypeModelFacetLinks_Binding_4002(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getConnector_2001ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getComponent_2002ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getRole_3001ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getRepresentation_3002ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getSystem_3003ContainedLinks(
			View view) {
		System modelElement = (System) view.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		result.addAll(getContainedTypeModelFacetLinks_Attachment_4001(modelElement));
		result.addAll(getContainedTypeModelFacetLinks_Binding_4002(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getComponent_3004ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getPort_3005ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getConnector_3006ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getAttachment_4001ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getBinding_4002ContainedLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getConnector_2001IncomingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getComponent_2002IncomingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getRole_3001IncomingLinks(
			View view) {
		Role modelElement = (Role) view.getElement();
		Map/*[org.eclipse.emf.ecore.EObject, java.util.Collection<org.eclipse.emf.ecore.EStructuralFeature.Setting>]*/crossReferences = EcoreUtil.CrossReferencer
				.find(view.eResource().getResourceSet().getResources());
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		result.addAll(getIncomingTypeModelFacetLinks_Attachment_4001(
				modelElement, crossReferences));
		result.addAll(getIncomingTypeModelFacetLinks_Binding_4002(modelElement,
				crossReferences));
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getRepresentation_3002IncomingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getSystem_3003IncomingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getComponent_3004IncomingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getPort_3005IncomingLinks(
			View view) {
		Port modelElement = (Port) view.getElement();
		Map/*[org.eclipse.emf.ecore.EObject, java.util.Collection<org.eclipse.emf.ecore.EStructuralFeature.Setting>]*/crossReferences = EcoreUtil.CrossReferencer
				.find(view.eResource().getResourceSet().getResources());
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		result.addAll(getIncomingTypeModelFacetLinks_Attachment_4001(
				modelElement, crossReferences));
		result.addAll(getIncomingTypeModelFacetLinks_Binding_4002(modelElement,
				crossReferences));
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getConnector_3006IncomingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getAttachment_4001IncomingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getBinding_4002IncomingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getConnector_2001OutgoingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getComponent_2002OutgoingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getRole_3001OutgoingLinks(
			View view) {
		Role modelElement = (Role) view.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		result.addAll(getOutgoingTypeModelFacetLinks_Attachment_4001(modelElement));
		result.addAll(getOutgoingTypeModelFacetLinks_Binding_4002(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getRepresentation_3002OutgoingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getSystem_3003OutgoingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getComponent_3004OutgoingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getPort_3005OutgoingLinks(
			View view) {
		Port modelElement = (Port) view.getElement();
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		result.addAll(getOutgoingTypeModelFacetLinks_Attachment_4001(modelElement));
		result.addAll(getOutgoingTypeModelFacetLinks_Binding_4002(modelElement));
		return result;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getConnector_3006OutgoingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getAttachment_4001OutgoingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	public static List/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getBinding_4002OutgoingLinks(
			View view) {
		return Collections.EMPTY_LIST;
	}

	/**
	 * @generated
	 */
	private static Collection/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getContainedTypeModelFacetLinks_Attachment_4001(
			System container) {
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		for (Iterator/*[?]*/links = container.getAttachments().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof Attachment) {
				continue;
			}
			Attachment link = (Attachment) linkObject;
			if (ConnectorRoleDelegatedRolesEditPart.VISUAL_ID != AcmeADManagementMetamodelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			SimpleElement dst = link.getTarget();
			SimpleElement src = link.getSource();
			result.add(new AcmeADManagementMetamodelLinkDescriptor(src, dst,
					link,
					AcmeADManagementMetamodelElementTypes.Attachment_4001,
					ConnectorRoleDelegatedRolesEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getContainedTypeModelFacetLinks_Binding_4002(
			System container) {
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		for (Iterator/*[?]*/links = container.getBindings().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof Binding) {
				continue;
			}
			Binding link = (Binding) linkObject;
			if (ComponentPortDelegatedPortsEditPart.VISUAL_ID != AcmeADManagementMetamodelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			SimpleElement dst = link.getTarget();
			SimpleElement src = link.getSource();
			result.add(new AcmeADManagementMetamodelLinkDescriptor(src, dst,
					link, AcmeADManagementMetamodelElementTypes.Binding_4002,
					ComponentPortDelegatedPortsEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getIncomingTypeModelFacetLinks_Attachment_4001(
			SimpleElement target,
			Map/*[org.eclipse.emf.ecore.EObject, java.util.Collection<org.eclipse.emf.ecore.EStructuralFeature.Setting>]*/crossReferences) {
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		Collection/*[org.eclipse.emf.ecore.EStructuralFeature.Setting]*/settings = (Collection) crossReferences
				.get(target);
		for (Iterator/*[org.eclipse.emf.ecore.EStructuralFeature.Setting]*/it = settings
				.iterator(); it.hasNext();) {
			EStructuralFeature.Setting setting = (EStructuralFeature.Setting) it
					.next();
			if (setting.getEStructuralFeature() != AcmeadmanagementPackage.eINSTANCE
					.getLink_Target()
					|| false == setting.getEObject() instanceof Attachment) {
				continue;
			}
			Attachment link = (Attachment) setting.getEObject();
			if (ConnectorRoleDelegatedRolesEditPart.VISUAL_ID != AcmeADManagementMetamodelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			SimpleElement src = link.getSource();
			result.add(new AcmeADManagementMetamodelLinkDescriptor(src, target,
					link,
					AcmeADManagementMetamodelElementTypes.Attachment_4001,
					ConnectorRoleDelegatedRolesEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getIncomingTypeModelFacetLinks_Binding_4002(
			SimpleElement target,
			Map/*[org.eclipse.emf.ecore.EObject, java.util.Collection<org.eclipse.emf.ecore.EStructuralFeature.Setting>]*/crossReferences) {
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		Collection/*[org.eclipse.emf.ecore.EStructuralFeature.Setting]*/settings = (Collection) crossReferences
				.get(target);
		for (Iterator/*[org.eclipse.emf.ecore.EStructuralFeature.Setting]*/it = settings
				.iterator(); it.hasNext();) {
			EStructuralFeature.Setting setting = (EStructuralFeature.Setting) it
					.next();
			if (setting.getEStructuralFeature() != AcmeadmanagementPackage.eINSTANCE
					.getLink_Target()
					|| false == setting.getEObject() instanceof Binding) {
				continue;
			}
			Binding link = (Binding) setting.getEObject();
			if (ComponentPortDelegatedPortsEditPart.VISUAL_ID != AcmeADManagementMetamodelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			SimpleElement src = link.getSource();
			result.add(new AcmeADManagementMetamodelLinkDescriptor(src, target,
					link, AcmeADManagementMetamodelElementTypes.Binding_4002,
					ComponentPortDelegatedPortsEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getOutgoingTypeModelFacetLinks_Attachment_4001(
			SimpleElement source) {
		System container = null;
		// Find container element for the link.
		// Climb up by containment hierarchy starting from the source
		// and return the first element that is instance of the container class.
		for (EObject element = source; element != null && container == null; element = element
				.eContainer()) {
			if (element instanceof System) {
				container = (System) element;
			}
		}
		if (container == null) {
			return Collections.EMPTY_LIST;
		}
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		for (Iterator/*[?]*/links = container.getAttachments().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof Attachment) {
				continue;
			}
			Attachment link = (Attachment) linkObject;
			if (ConnectorRoleDelegatedRolesEditPart.VISUAL_ID != AcmeADManagementMetamodelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			SimpleElement dst = link.getTarget();
			SimpleElement src = link.getSource();
			if (src != source) {
				continue;
			}
			result.add(new AcmeADManagementMetamodelLinkDescriptor(src, dst,
					link,
					AcmeADManagementMetamodelElementTypes.Attachment_4001,
					ConnectorRoleDelegatedRolesEditPart.VISUAL_ID));
		}
		return result;
	}

	/**
	 * @generated
	 */
	private static Collection/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/getOutgoingTypeModelFacetLinks_Binding_4002(
			SimpleElement source) {
		System container = null;
		// Find container element for the link.
		// Climb up by containment hierarchy starting from the source
		// and return the first element that is instance of the container class.
		for (EObject element = source; element != null && container == null; element = element
				.eContainer()) {
			if (element instanceof System) {
				container = (System) element;
			}
		}
		if (container == null) {
			return Collections.EMPTY_LIST;
		}
		LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/result = new LinkedList/*[org.admanager.acme.plugin.diagram.part.AcmeADManagementMetamodelLinkDescriptor]*/();
		for (Iterator/*[?]*/links = container.getBindings().iterator(); links
				.hasNext();) {
			EObject linkObject = (EObject) links.next();
			if (false == linkObject instanceof Binding) {
				continue;
			}
			Binding link = (Binding) linkObject;
			if (ComponentPortDelegatedPortsEditPart.VISUAL_ID != AcmeADManagementMetamodelVisualIDRegistry
					.getLinkWithClassVisualID(link)) {
				continue;
			}
			SimpleElement dst = link.getTarget();
			SimpleElement src = link.getSource();
			if (src != source) {
				continue;
			}
			result.add(new AcmeADManagementMetamodelLinkDescriptor(src, dst,
					link, AcmeADManagementMetamodelElementTypes.Binding_4002,
					ComponentPortDelegatedPortsEditPart.VISUAL_ID));
		}
		return result;
	}

}
